<?php 
	session_start();
	require 'usercheck.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php 
	if($currenttype=='admin'||$currenttype=='boss'){
		require "connectdb.php";
		$result=mysql_query("SELECT * from reagent_idcounter");
		$row=mysql_fetch_array($result);
		$counter=$row['counter'];
		$counter=$counter+1;
		$issuccess = mysql_query("INSERT INTO reagent_data 
		(id, ypmc, lyl, lyrq, cfd, lyr, hxrq, jfh, admin, gg, scrq, scs, gb, ghs, yc, bzq, jd, dylyzd) 
		VALUES ('"
		.$counter."', '".$_POST['ypmc']."', '".$_POST['lyl']."', '".$_POST['lyrq']."', '".$_POST['cfd']."', '".$_POST['lyr']."', '".$_POST['hxrq']."', '".$_POST['jfh']."', '".$_POST['admin']."', '".$_POST['gg']."', '".$_POST['scrq']."', '".$_POST['scs']."', '".$_POST['gb']."', '".$_POST['ghs']."', '".$_POST['yc']."', '".$_POST['bzq']."', '".$_POST['jd']."', '".$_POST['dylyzd']."')");
		if($issuccess)  mysql_query("UPDATE reagent_idcounter SET counter = '" . $counter . "' WHERE counter = '" . ($counter-1) ."'");
	echo("<meta http-equiv=\"refresh\" content=\"0.5;url=data.php\">");
	}
?>	
</head>

<body>
<?php

	if(!$issuccess) echo "000000000";
?>
</body>
</html>